//从redux包中导入createStore函数
import {legacy_createStore as createStore,applyMiddleware,combineReducers} from 'redux'
//通过legacy_createStore函数创建store对象

import {composeWithDevTools} from 'redux-devtools-extension'
//导入redux-logger中间件
import logger from 'redux-logger'
import thunk from 'redux-thunk'


import shopcartReducer from './reducer/shopcartReducer'
import counterReducer from '@/store/reducer/counterReducer'


const bigReducers=combineReducers({
    counterKey:counterReducer,
    shopcartKey:shopcartReducer
})
const store=createStore(bigReducers,composeWithDevTools(applyMiddleware(thunk)))
//将这个store默认导出
export default store